<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAdminMenusTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admin_menus', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('parent_id')->default(0)->comment('上级编号');
            $table->string('name')->nullable()->comment('英文名称');
            $table->string('ico')->nullable()->comment('图标');
            $table->string('intro')->comment('中文名称');
            $table->string('api_router')->nullable()->comment('接口路由');
            $table->string('vue_router')->nullable()->comment('vue路由');
            $table->integer('state')->default(0)->comment('显示状态:0关闭，1显示');
            $table->integer('sort')->default(0)->comment('排序：越小越靠前');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('admin_menus');
    }
}
